package io.wit.modules.wit.service.impl;

import io.wit.modules.wit.dao.NoticeDao;
import io.wit.modules.wit.entity.NoticeEntity;
import io.wit.modules.wit.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;



@Service("noticeService")
public class NoticeServiceImpl implements NoticeService {
	@Autowired
	private NoticeDao noticeDao;
	
	@Override
	public NoticeEntity queryObject(Long dataId){
		return noticeDao.queryObject(dataId);
	}
	
	@Override
	public List<NoticeEntity> queryList(Map<String, Object> map){
		return noticeDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return noticeDao.queryTotal(map);
	}
	
	@Override
	public void save(NoticeEntity notice){
		notice.setCreatetime(new Date());
		noticeDao.save(notice);
	}
	
	@Override
	public void update(NoticeEntity notice){
		noticeDao.update(notice);
	}
	
	@Override
	public void delete(Long dataId){
		noticeDao.delete(dataId);
	}
	
	@Override
	public void deleteBatch(Long[] dataIds){
		noticeDao.deleteBatch(dataIds);
	}

	@Override
	public NoticeEntity queryObjects() {
		return noticeDao.queryObjects();
	}
	
}
